﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet"  type="text/css" />
    <link href="../../../Scripts/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../../Comm/Gener.js"></script>
    <script src="DDLBar.js" type="text/javascript"></script>
    <script src="../../CCFlowEnum.js" type="text/javascript"></script>
    <script src="../../../Scripts/EasyUIUtility.js" type="text/javascript"></script>

    <script  type="text/javascript">
        //初始化页面
        $(function () {
            InitBar(DeliveryWay.ByBindEmp);
            var ens = new Entities("BP.WF.Template.NodeEmps");
            ens.Retrieve("FK_Node", GetQueryString("FK_Node"));


            var html = "<table style='width:100%;' >";
            html += "<caption >已经设置的处理人,合计:(<font color=red>" + ens.length + "</font>)条</caption>";
            var idx = 0;
            for (var i = 0; i < ens.length; i++) {
                var en = ens[i];

                if (idx == 0)
                    html += "<tr>";

                html += "<td>" + en.FK_EmpText + "</td>";

                idx++;
                if (idx == 4) {
                    idx = 0;
                    html += "</tr>";
                }
            }

            html += "</table>";
            document.getElementById("emp").innerHTML = html;


        });

        //弹出新窗体
        function OpenDialog() {

            var url = "../../../Comm/RefFunc/BranchesAndLeaf.htm?EnName=BP.WF.Template.NodeSheet&Dot2DotEnsName=BP.WF.Template.NodeEmps&Dot2DotEnName=BP.WF.Template.NodeEmp&AttrOfOneInMM=FK_Node&AttrOfMInMM=FK_Emp&EnsOfM=BP.Port.Emps&DefaultGroupAttrKey=FK_Dept";
            var nodeID = GetQueryString("FK_Node");
            url += '&NodeID=' + nodeID + '&PKVal=' + nodeID + "&M=" + Math.random();

            OpenEasyUiDialogExt(url, '设置人员', 800, 500, true);

        }
        function Save() {
            var nodeID = GetQueryString("FK_Node");
            var node = new Entity("BP.WF.Node", nodeID);
            node.DeliveryWay = DeliveryWay.ByBindEmp;
            node.Update();

            alert("保存成功.");

        }
    </script>
</head>

<body>
<div id="bar"> </div>
 
<fieldset>
    <legend>设置</legend>
    <ul>
        <li>
            <a href="javascript:OpenDialog()">设置/更改处理人</a>
        <li>说明：绑定的所有的人员，都可以处理该节点的工作。</li>

        </li>                                                      
    </ul>
</fieldset>
 

<div id="emp"> </div>

</body>
</html>
